package com.mhc.haval.security.service;

import com.mhc.haval.security.dto.UserDTO;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author Churry
 * @create 2017-08-30 17:21
 **/
@FeignClient("HAVAL")
@RequestMapping("/feign/IStaffService")
public interface IStaffService {

    /**
     * 通过用户名（手机号）查询用户信息
     * @param staffPhone
     * @return
     */
    @RequestMapping(value = {"/getUserByPhone"}, method = {RequestMethod.GET})
    UserDTO getUserByPhone(@RequestParam("staffPhone") String staffPhone);

    /**
     * 通过id查询员工信息，不包含角色与权限信息
     * @param staffId
     * @return
     */
    @RequestMapping(value = {"/getUserByStaffId"}, method = {RequestMethod.GET})
    UserDTO getUserByStaffId(@RequestParam("staffId") Long staffId);

}
